export const namespace = "adminSystemDict";

export const calcColumns = (params) => {
  const { operate } = params;
  const columns = [
    {
      title: "ID",
      hidden: process.env.UMI_ENV == "prod" ? true : false,
      width: 180,
      dataIndex: "id",
      hideInSearch: true,
    },
    {
      title: "字典名称",
      dataIndex: "name",
    },
    {
      title: "子项数",
      dataIndex: "number",
      hideInSearch: true,
    },
    // {
    //   title: '更新人',
    //   dataIndex: 'updateBy',
    //   hideInSearch: true
    // },
    // {
    //   title: '更新时间',
    //   dataIndex: 'updateTime',
    //   hideInSearch: true
    // },
    {
      title: "营业状态",
      dataIndex: "state",
      hideInSearch: true,
      valueEnum: {
        all: { text: "全部", status: "Default" },
        close: { text: "关闭", status: "Default" },
        running: { text: "运行中", status: "Processing" },
        online: { text: "已上线", status: "Success" },
        error: { text: "异常", status: "Error" },
      },
    },
  ];

  columns.push(operate);
  return columns;
};
